var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = require('mongoose').Schema.Types.ObjectId;
// var ObjectId = require('mongoose').Types.ObjectId;
// Define User schema 
var _user = new Schema({ 
    username : String,
    password : String,
    email : String,
    company : String,
    phone :String,
    state : Number,
    lession : [], 
    active : Number,
    create_time: { type: Date, default: Date.now },
    update_time: { type: Date, default: Date.now }
});

// export them 
exports.user = mongoose.model('user', _user);